/**
 * 
 */
package com.google.code.cisx.wfe.events;

import com.google.code.cisx.wfe.model.Activity;

/**
 * @author <a href='mailto:rthakur@bravurasolutions.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public class ActivityEvent extends TypedEvent<Activity> {

    public enum ActivityEventType implements EventType {

        /**
         * Implies that an Activity has started.
         */
        ACTIVITY_STARTED("Activity Started"),

        /**
         * Implies that an active Activity is now suspended.
         */
        ACTIVITY_SUSPENDED("Activity Suspended"),

        /**
         * Implies that an Activity has terminated.
         */
        ACTIVITY_COMPLETED("Activty Finished");

        /**
         * Event type expressed as String.
         */
        private String type;

        /**
         * @param type
         */
        private ActivityEventType(String type) {
            this.type = type;
        }

        @Override
        public String asString() {
            return type;
        }

    }

    public ActivityEvent(Activity source, EventType type) {
        super(source, type);
    }

}
